// 不准使用正则表达式，纯粹用 JavaScript 的逻辑实现：在一个字符串中，找到字符“abcdef”
function searchCharToString(str){
    let foundA = false;
    let foundB = false;
    let foundC = false;
    let foundD = false;
    let foundE = false;
    for(let s of str){
      if(s=="a"){
        foundA = true;
      }else if(foundA&&s=="b"){
        foundB = true;
      }else if(foundB&&s=="c"){
        foundC = true;
      }else if(foundC&&s=="d"){
        foundD = true;
      }else if(foundD&&s=="e"){
        foundE = true;
      }else if(foundE&&s=="f"){
        return true;
      }
    }
    return false;
}

console.log(searchCharToString("fafdfsaabcdefafdaf"))